home *** CD-ROM | disk | FTP | other *** search
- INCLUDE '*.lng'
- = show differences in a text box
- INCLUDE 'def.mps'
-
- option globalvars, 1
- var count dword, len dword, blocklen dword, size text
- var start dword ende dword s1 dword msg text
-
- count = compare_count
- if count < 1
- msgbox __NODIFF__, MB_ICONASTERISK:
- end
- endif
-
-
- = calculate the maximum length of a diff block size
- blocklen = 0
- number_radix = 10
- number_prefix = ''
- number_suffix = ''
- loop checkdifflen, count
-
- loop line, count
- showprogress 100,100
-
- textbox msg, __COMP__
- end
-
-
- = sub: check length of difference block
- @@checkdifflen
- len = textlen(text(compare_end(loop)-compare_start(loop)+1))
- if len > blocklen
- blocklen = len
- endif
- return
-
- = sub:adjust size length
- @@adj1
- size = ' '+size
- return
-
- @@adjustsize
- loop adj1, (blocklen - textlen(size))
- return
-
- = sub:write diff line
- @@line
- start = compare_start(loop)
- ende=compare_end(loop)
- number_radix = 10
- number_prefix = ''
- number_suffix = ''
- concat msg (__BLK__+text(loop+1)+":\t")
- number_radix = 16
- number_prefix = '0x'
- concat msg (text(start)+' - '+text(ende)+' (')
- number_radix = 10
- number_prefix = ''
- s1 = ende - start + 1:size = text(s1): call adjustsize
- if s1 == 1
- concat msg (size + __1BYTE__)
- else
- concat msg (size + __BYTES__)
- endif
- showprogress count , loop
- return
-
-
-
-